package day05;
import java.util.Arrays;
public class Max0fArray {
    public static void main(String[] args) {
        /*int[] arr = new int[10];
        for(int i=0;i<arr.length;i++){
            arr[i]=(int)(Math.random()*100);
            System.out.println(arr[i]);
        }*/
        /*int[] arr ={12,56,89,8};
        int max = arr[0];
        for(int i=0;i<arr.length;i++){
            if(arr[i]>max){
                max = arr[i];
            }
        }
        System.out.println("最大值为："+max);*/

        /*int[] arr = {12,53,63,46};
        int max = arr[0];
        for (int i = 0; i < arr.length; i++) {
            if (arr[i]>max){
                max = arr[i];
            }
        }
        System.out.println("最大值"+max);*/
        /*int[] a = {10,20,30,40,50};
        int[] b = Arrays.copyOf(a,a.length+1);
        for(int i=0;i<b.length;i++){
            System.out.println(b[i]);
        }
        System.out.println("---------------");

        a = Arrays.copyOf(a,4);
        for(int i=0;i<a.length;i++){
            System.out.println(a[i]);
        }*/




    }
}
